<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="../../css/weui.min.css">
    <link rel="stylesheet" href="../../css/weuix.css"/>
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/vue.js"></script>
    <script src="../../js/axios.min.js"></script>


    <script src="../../js/f2.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
    <script src="https://unpkg.com/vue-chartjs/dist/vue-chartjs.min.js"></script>

    <script src="../../js/app.js"></script>
    <script>
        var uid = getUrlParam('uid');
    </script>
    <style>
        .weui-flex_box{
            margin-top: 20px;
        }
        h3{
            color: #ff851b;
            font-size: 1.5em;
        }
        .placeholder {
            margin: 5px;
            padding: 0 10px;
            background-color: #ebebeb;
            height: 4.3em;
            line-height: 4.3em;
            text-align: center;
            color: #ff851b;
            font-size: 1.5em;
        }

        .placeholder2 {
            margin: 5px;
            padding: 10px 10px;
            background-color: #ebebeb;
            text-align: center;
            font-size: 14px;
        }

        .placeholder3 {
            margin: 5px;
            padding: 10px 10px;
            background-color: #ebebeb;
            text-align: center;
            font-size: 14px;
        }
        .weui-form-preview{
            font-size: 15px;
        }

    </style>
</head>


<body>

<div ontouchstart id="app">
    <div class="weui-flex">
        <div class="weui-flex__item"><div class="placeholder">{{user.verify_name}}-淘宝数据报告</div></div>
    </div>
    
    <div class="weui-tab" id="t3" style="height:44px;">
        <div class="weui-navbar">
            <div class="weui-navbar__item" onclick="location.href='report.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie">
                综合报告
            </div>
            <div class="weui-navbar__item" onclick="location.href='report_base.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie">
                基础信息
            </div>
            <div class="weui-navbar__item" onclick="location.href='report_radar.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie">
                多头报告
            </div>
            <div class="weui-navbar__item" onclick="location.href='report_carrier.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie">
                运营商报告
            </div>
            <div class="weui-navbar__item tab-blue" >
                淘宝数据报告
            </div>
            <div class="weui-navbar__item"  onclick="location.href='report_contacts.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie">
                手机通讯录
            </div>
            <div class="weui-navbar__item"  onclick="location.href='report_messages.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie">
                手机短信
            </div>
        </div>

    </div>

	<div v-if="reportbool == false" style="margin-top:30px;">&nbsp;&nbsp;&nbsp;暂无报告</div>
	
	<div  v-if="reportbool">
		<div class="weui-flex weui-flex_box">


			<div class="weui-flex__item">
				<div class="placeholder2">
					<h3 class="page-hd-title">
						基本信息
					</h3>
					<p class="page-hd-desc"></p>
					<div class="weui-form-preview">
						<div class="weui-form-preview__bd">
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">账号</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.user_name"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">昵称</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.nick_name"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">姓名</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.real_name"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">身份证号</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.id_card"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">是否实名认证</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.identity_status"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">认证渠道</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.identity_channel"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">登录邮箱</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.email"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">绑定手机</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.mobile"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">会员等级</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.vip_level"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">信用积分</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.credit_score"></span>
							</div>
							<div class="weui-form-preview__item">
								<label class="weui-form-preview__label">芝麻分</label>
								<span class="weui-form-preview__value" v-html="report.data.basic_info.zm_score"></span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>


		<div class="weui-flex weui-flex_box">


			<div class="weui-flex__item">
				<div class="placeholder3">
					<h3 class="page-hd-title">
						收货地址
					</h3>
					<table class="weui-table" >
						<thead>
						<tr>
							<th>收件人姓名	</th>
							<th>联系电话</th>
							<th>邮编</th>
							<th>详细地址</th>

						</tr>
						</thead>
						<tbody >

						<tr v-for="itemtop in report.data.addresses">
							<td title="收件人姓名">{{itemtop.name}}</td>
							<td title="联系电话">{{itemtop.phone_no}}</td>
							<td title="邮编">{{itemtop.postcode}}</td>
							<td title="详细地址">{{itemtop.address}}	</td>
						</tr>

						</tbody>
					</table>
				</div>
			</div>
		</div>


		<div class="weui-flex weui-flex_box">
			<div class="weui-flex__item">
				<div class="placeholder3">
					<h3 class="page-hd-title">
						近期交易记录
					</h3>
					<table class="weui-table" >
						<thead>
						<tr>
							<th>时间	</th>
							<th>商品</th>
							<th>金额</th>
							<th>状态</th>

						</tr>
						</thead>
						<tbody >

						<tr v-for="itemtop in report.data.trade_details">
							<td title="时间">{{itemtop.trade_info.trade_time}}</td>
							<td title="商品">{{itemtop.trade_info.seller}}</td>
							<td title="金额">{{itemtop.trade_info.amount}}</td>
							<td title="状态">{{itemtop.trade_info.trade_status}}	</td>
						</tr>

						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>

<script>
    var uid = getUrlParam('uid');
    var oid = getUrlParam('oid');
    var mobile = getUrlParam('mobile');
    var moxie = getUrlParam('moxie');
    var app = new Vue({
        el: '#app',
        data: {
            report:'',
			reportbool:false,
            loading: false,
			user:{}
        },
        mounted: function () {
            this.taobaoDataRreport();
			this.userinfo();
        },
        methods: {
			userinfo: function () {
				var vm = this;
				axios.post('/api/user/report/userinfo', {
					uid:uid
				}).then(function (response) {
					var obj = response.data;
					if(obj.code == 0) {
						vm.user = obj.data;
					}else{

					}
				}).catch(function (response) {
					console.log(response);
				});
			},
            taobaoDataRreport: function () {
                var vm = this;
                axios.post('/api/user/report/taobao', {
                    uid:uid,
                    oid:oid
                }).then(function (response) {
                    var obj = response.data;
                    if(obj.code == 0) {
                        vm.report = obj.data;
                        vm.loading = true
						vm.reportbool = true;
                    } else {
                        
                    }
                }).catch(function (response) {
                    console.log(response);
                });
            }
        }
    });
</script>

</body>
</html>
